package com.joizhang.seckill.api.service.exception;

/**
 * 自定义全局异常类
 */
public class ServiceException extends RuntimeException {

    private CodeMsg codeMsg;

    public ServiceException() {}

    public ServiceException(CodeMsg codeMsg) {
        super(codeMsg.toString());
        this.codeMsg = codeMsg;
    }

    public CodeMsg getCodeMsg() {
        return codeMsg;
    }

    public void setCodeMsg(CodeMsg codeMsg) {
        this.codeMsg = codeMsg;
    }
}
